package com.foreknow.demo5;

import javax.imageio.stream.ImageInputStream;

public class Manager1 {
    //求基数和偶数和
    public static int arr(int t){
        //奇数和

      for (int i=1;i<100;i++){
       //   int j = 0;//所有的奇数
          t= t+i;

      }
       return t;
    }
    //求所有偶数的和
    public static int arr1(int m){
        //偶数和
        for (int i=0;i<100;i++ ){
            if (i%2==0){
                m+=m+i;
                System.out.println(m);
            }


        }
        return m;
    }

    public static void main(String[] args) {
        int arr =Manager1.arr(100);
        System.out.println(arr);
        int arr1 = Manager1.arr1(100);
        System.out.println(arr1);
        System.out.println(arr+arr1);

    }
}
